package com.zjcode.cdcer.service;

import com.chinatechstar.component.commons.result.ListResult;
import com.chinatechstar.component.commons.supports.PageData;
import com.zjcode.cdcer.model.basic.JsonObj;
import com.zjcode.cdcer.service.fallback.ArticleInfoServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "zjcode-chronic-disease-cancer-server", fallback = ArticleInfoServiceFallback.class)
public interface ArticleInfoService {

    @PostMapping("/cdcerserver/v1/articleinfo/createArticleInfo")
    JsonObj createArticleInfo(@RequestBody PageData pageData);

    @PostMapping("/cdcerserver/v1/articleinfo/updateArticleInfo")
    JsonObj updateArticleInfo(@RequestBody PageData pageData);

    @PostMapping("/cdcerserver/v1/articleinfo/deleteById")
    JsonObj deleteById(@RequestBody PageData pageData);

    @PostMapping("/cdcerserver/v1/articleinfo/listLatestArticles")
    JsonObj listLatestArticles(@RequestBody PageData pageData);

    @PostMapping("/cdcerserver/v1/articleinfo/listByPage")
    ListResult<Object> listByPage(PageData pageData);
}
